1. Field of the Invention
The present invention relates to a magnetic disk device having a controller, a drive and an interface unit related to SCSI (Small Computer System Interface) and, more particularly, to a data check circuit of a magnetic disk device for checking existence/non-existence of abnormality of data to be transferred in the magnetic disk device, a data check system of a magnetic disk device and a data checking method of a magnetic disk device.
2. Description of the Related Art
In a magnetic disk device in a personal computer or the like, data is transferred between a controller and a drive through an interface unit related to SCSI. In other words, xe2x80x9cdata writingxe2x80x9d is conducted which is data transfer from an upper circuit in the controller to a lower circuit in the drive and xe2x80x9cdata readingxe2x80x9d is conducted which is data transfer from the lower circuit to the upper circuit. Needed here, at such data transfer, is a check of the data in question for securing reliability of the data. Mechanisms realizing such a data check are a data check circuit of a magnetic disk device, a data check system of a magnetic disk device and a data checking method of a magnetic disk device according to the present invention.
In a data check circuit of a magnetic disk device of this kind (description will be here made of a conventional xe2x80x9cdata check circuit of a magnetic disk devicexe2x80x9d which also represents a xe2x80x9cdata check system of a magnetic disk devicexe2x80x9d and a xe2x80x9cdata checking method of a magnetic disk devicexe2x80x9d), conventionally, sending a parity code (parity signal) of data to be transferred onto a parity signal line provided together with an SCSI signal line (signal line for sending data based on SCSI) leads to a check of existence/non-existence of abnormality of the data in question.
In recent years, as the transfer rate of data to be transferred to/from a magnetic disk device has increased such that errors are more likely to occur, it becomes more difficult to ensure reliability of the data in question by only using a parity code.
The above-described conventional data check circuit of a magnetic disk device has the following problems.
The first problem is that in view of a recent increase in the transfer rate of data to be transferred to/from a magnetic disk device, it is difficult to ensure reliability of the data only with a parity code as mentioned above.
The second problem is that when an error occurs in data to be transferred to/from a magnetic disk device, correction of the data in question is impossible because a parity code has a data error detection function but lacks an error correction function.
An object of the present invention is to provide a data check circuit of a magnetic disk device and a data checking method of a magnetic disk device which enable reliability of data to be sent and received (transferred) to be improved and an error occurring in the data in question to be corrected by the generation of an ECC (Error Correcting Code) from a data transmission side (at a controller at the time of data writing to a lower circuit in a drive and at the drive at the time of data reading into an upper circuit.in the controller) and sending of the same onto an existing parity signal line, and a check of the ECC at a data reception side (at the drive at the time of data writing and at the controller at the time of data reading).
Another object of the present invention is to provide a data check circuit of a magnetic disk device and a data checking method of a magnetic disk device enabling reliability of data to be transferred at the magnetic disk device to be more improved than that by the use of a parity code according to conventional art, thereby coping with a recent increase in a transfer rate at a magnetic disk device.
A further object.of the present invention is to provide a data check circuit of a magnetic disk device and a data checking method of a magnetic disk device enabling not only detection of an error in data to be transferred at the magnetic disk device but also correction of an error in data where the error is detected.
According to the first aspect of the invention, a data check device of a magnetic disk device, comprises
controller side data check means for conducting, at data writing, generation of an ECC for data sent from an upper circuit, sending of data through a data signal line and sending of the ECC onto a parity signal line, and at data reading, reception of data on the data signal line, reception of an ECC on the parity signal line, an ECC check based on the data and the ECC, correction of an error when the error is detected in the ECC check and sending of the data to the upper circuit; and
drive side data check means for conducting, at data writing, reception of data through the data signal line, reception of an ECC on the parity signal line, an ECC check based on the data and the ECC, correction of an error when the error is detected in the ECC check, and sending of the data to a lower circuit, and at data reading, generation of an ECC for data sent from the lower circuit, sending of the data onto the data signal line and sending of the ECC onto the parity signal line.
In the preferred construction, the controller side data check means comprises ECC generation means for generating the ECC based on data at data writing, ECC check means for conducting the ECC check at data reading, and ECC control means for correcting data based on the ECC check, and
the drive side data check means comprises ECC generation means for generating the ECC based on data at data reading, ECC check means for conducting the ECC check at data writing, and ECC control means for correcting data based on the ECC check.
In another preferred construction, the controller side data check means comprises ECC generation means for generating the ECC based on data at data writing, ECC check means for conducting the ECC check at data reading, ECC control means for correcting data based on the ECC check, and interface means for transmitting and receiving data to and from the drive side and transmitting data to the ECC generation means at data writing, and
the drive side data check means comprises ECC generation means for generating the ECC based on data at data reading, ECC check means for conducting the ECC check at data writing, ECC control means for correcting data based on the ECC check, and interface means for transmitting and receiving data to and from the controller side and transmitting data to the ECC generation means at data reading.
In another preferred construction, the controller side data check means comprises ECC generation means for generating the ECC based on data at data writing, ECC check means for conducting the ECC check at data reading, ECC control means for correcting data based on the ECC check, interface means for transmitting and receiving data to and from the drive side and transmitting data to the ECC generation means at data writing, and ECC memory means for storing an ECC generated by the ECC generation means and sending the ECC onto the parity signal line at data writing and receiving an ECC from the parity signal line and storing the ECC at data reading,
the ECC check means conducting an ECC check using an ECC stored in the ECC memory means and data received from the data signal line and outputting check results of the ECC check to the ECC control means at data reading, and
the drive side data check means comprises ECC generation means for generating the ECC based on data at data reading, ECC check means for conducting the ECC check at data writing, ECC control means for correcting data based on the ECC check, interface means for transmitting and receiving data to and from the controller side and transmitting data to the ECC generation means at data reading, and ECC memory means for receiving an ECC from the parity signal line and storing the ECC at data writing and storing an ECC generated by the ECC generation means and sending the ECC onto the parity signal line at data reading,
the ECC check means conducting an ECC check using an ECC stored in the ECC memory means and data received from the SCSI signal line and outputting check results of the ECC check to the ECC control means at data writing.
In another preferred construction, the controller side and the drive side interface means are SCSI controllers.
According to the second aspect of the invention, a data check device of a magnetic disk device, comprises
a controller side data check circuit for conducting, at data writing, generation of an ECC for data sent from an upper circuit, sending of data through a data signal line and sending of the ECC onto a parity signal line, and at data reading, reception of data on the data signal line, reception of an ECC on the parity signal line, an ECC check based on the data and the ECC, correction of an error when the error is detected in the ECC check and sending of the data to the upper circuit, and
drive side data check circuit for conducting, at data writing, reception of data through the data signal line, reception of an ECC on the parity signal line, an ECC check based on the data and the ECC, correction of an error when the error is detected in the ECC check and sending of the data to a lower circuit, and at data reading, generation of an ECC for data sent from the lower circuit, sending of the data onto the data signal line and sending of the ECC onto the parity signal line.
In the preferred construction, the controller side data check circuit comprises an ECC generation circuit for generating the ECC based on data at data writing, an ECC check circuit for conducting the ECC check at data reading, and an ECC control circuit for correcting data based on the ECC check, and
the drive side data check circuit comprises an ECC generation circuit for generating the ECC based on data at data reading, an ECC check circuit for conducting the ECC check at data writing, and an ECC control circuit for correcting data based on the ECC check.
In another preferred construction, the controller side data check circuit comprises an ECC generation circuit for generating the ECC based on data at data writing, an ECC check circuit for conducting the ECC check at data reading, an ECC control circuit for correcting data based on the ECC check, and an interface circuit for transmitting and receiving data to and from the drive side and transmitting data to the ECC generation circuit at data writing, and
the drive side data check circuit comprises an ECC generation circuit for generating the ECC based on data at data reading, an ECC check circuit for conducting the ECC check at data writing, an ECC control circuit for correcting data based on the ECC check, and an interface circuit for transmitting and receiving data to and from the controller side and transmitting data to the ECC generation circuit at data reading.
In another preferred construction, the controller side data check circuit comprises an ECC generation circuit for generating the ECC based on data at data writing, an ECC check circuit for conducting the ECC check at data reading, an ECC control circuit for correcting data based on the ECC check, an interface circuit for transmitting and receiving data to and from the drive side and transmitting data to the ECC generation circuit at data writing, and an ECC memory circuit for storing an ECC generated by the ECC generation circuit and sending the ECC onto the parity signal line at data writing and receiving an ECC from the parity signal line and storing the ECC at data reading,
the ECC check circuit conducting an ECC check using an ECC stored in the ECC memory circuit and data received from the data signal line and outputting check results of the ECC check to the ECC control circuit at data reading, and
the drive side data check circuit comprises an ECC generation circuit for generating the ECC based on data at data reading, an ECC check circuit for conducting the ECC check at data writing, an ECC control circuit for correcting data based on the ECC check, an interface circuit for transmitting and receiving data to and from the controller side and transmitting data to the ECC generation circuit at data reading, and an ECC memory circuit for receiving an ECC from the parity signal line and storing the ECC at data writing and storing an ECC generated by the ECC generation circuit and sending the ECC onto the parity signal line at data reading,
the ECC check circuit conducting an ECC check using an ECC stored in the ECC memory circuit and data received from the SCSI signal line and outputting check results of the ECC check to the ECC control circuit at data writing.
In another preferred construction, the controller side and the drive side interface circuits are SCSI controllers.
According to the third aspect of the invention, a data checking method of a magnetic disk device, comprising the steps of
as controller side processing at data writing,
ECC generation of generating an ECC for data to be written,
data sending of sending data to be written onto a data signal line after a session between a controller and a drive is established, and
ECC sending of sending, in synchronization with data sending at the data sending step, an ECC code for the data in question onto a parity signal line, and
as drive side processing at data writing
data reception of receiving data to be written which is sent from the controller side through an SCSI signal line,
ECC operation of conducting ECC operation with respect to data received at the data reception step,
ECC reception of receiving an ECC sent from the controller side through the parity signal line,
ECC check of conducting an ECC check based on an ECC received at the ECC reception step and operation results of ECC operation at the ECC operation step, and
error correction of correcting, when an error is found in the ECC check, the erroneous part of data based on the ECC check.
In the preferred construction, when no error is found in the ECC check, data received at the data reception step is written into a lower circuit, and
when an error is found in the ECC check, an erroneous part of data received at the data reception step is corrected based on the ECC check and the corrected data is written into the lower circuit.
In another preferred construction, the data checking method of a magnetic disk device further comprising the steps of
as controller side processing at data writing,
reception of receiving data to be written and control information indicative of writing which are sent from an upper circuit, wherein
processing contents is recognized to be writing by the control information to generate an ECC for data received at the control information reception step, and
as drive side processing at data writing,
processing recognition of recognizing that processing contents is data writing to a lower circuit at the exchange of control information with the controller side, and
permission information sending of sending information which permits data transfer for writing to the controller side at the time when preparations for writing at the lower circuit are complete, wherein
data to be written is received which is sent from the controller side through the data signal line according to sending of the permission information.
According to the fourth aspect of the invention, a data checking method of a magnetic disk device, comprising the steps of
as drive side processing at data reading,
ECC generation of generating an ECC for data to be read,
data sending of sending data to be read onto a data signal line after a session between a drive and a controller is established, and
ECC sending of sending, in synchronization with data sending at the data sending step, an ECC code for the data in question onto a parity signal line, and
as controller side processing at data reading
data reception of receiving data to be read which is sent from the drive side through the data signal line,
ECC operation of conducting ECC operation with respect to data received at the data reception step,
ECC reception of receiving an ECC sent from the drive side through the parity signal line,
ECC check of conducting an ECC check based on an ECC received at the ECC reception step and operation results of ECC operation at the ECC operation step, and
error correction of correcting, when an error is found in the ECC check, the erroneous part of data based on the ECC check.
In the preferred construction, when no error is found in the ECC check, data received at the data reception step is read into an upper circuit, and
when an error is found in the ECC check, an erroneous part of data received at the data reception step is corrected based on the ECC check and the corrected data is read into the upper circuit.
In another preferred construction, the data checking method of a magnetic disk device further comprising the steps of
as drive side processing at data reading,
information reception of receiving data to be read and control information indicative of reading which are sent from a lower circuit, wherein
processing contents is recognized to be reading by by the control information to generate an ECC for data received at the control information reception step, and
as controller side processing at data reading,
processing recognition of recognizing that processing contents is data reading into an upper circuit at the exchange of control information with the drive side, and
permission information sending of sending information which permits data transfer for reading to the drive side at the time when preparations for reading to the upper circuit are complete, wherein
data to be read is received which is sent from the drive side through the data signal line according to sending of the permission information.
According to another aspect of the invention, a data checking method of a magnetic disk device, comprising the steps of
as controller side processing at data writing,
ECC generation of generating an ECC for data to be written,
data sending of sending data to be written onto a data signal line after a session between a controller and a drive is established, and
ECC sending of sending, in synchronization with data sending at the data sending step, an ECC code for the data in question onto a parity signal line,
as drive side processing at data writing
data reception of receiving data to be written which is sent from the controller side through an SCSI signal line,
ECC operation of conducting ECC operation with respect to data received at the data reception step,
ECC reception of receiving an ECC sent from the controller side through the parity signal line,
ECC check of conducting an ECC check based on an ECC received at the ECC reception step and operation results of ECC operation at the ECC operation step, and
error correction of correcting, when an error is found in the ECC check, the erroneous part of data based on the ECC check,
as drive side processing at data reading,
ECC generation of generating an ECC for data to be read,
data sending of sending data to be read onto the data signal line after a session between the drive and the controller is established, and
ECC sending of sending, in synchronization with data sending at the data sending step, an ECC code for the data in question onto the parity signal line, and
as controller side processing at data reading
data reception of receiving data to be read which is sent from the drive side through the data signal line,
ECC operation of conducting ECC operation with respect to data received at the data reception step,
ECC reception of receiving an ECC sent from the drive side through the parity signal line,
ECC check of conducting an ECC check based on an ECC received at the ECC reception step and operation results of ECC operation at the ECC operation step, and
error correction of correcting, when an error is found in the ECC check, the erroneous part of data based on the ECC check.
According to a further aspect of the invention, a computer readable memory which stores a data check program for conducting a data check of a magnetic disk device, the data check program comprising the steps of
as controller side processing at data writing,
ECC generation of generating an ECC for data to be written,
data sending of sending data to be written onto a data signal line after a session between a controller and a drive is established, and
ECC sending of sending, in synchronization with data sending at the data sending step, an ECC code for the data in question onto a parity signal line, and
as drive side processing at data writing
data reception of receiving data to be written which is sent from the controller side through an SCSI signal line,
ECC operation of conducting ECC operation with respect to data received at the data reception step,
ECC reception of receiving an ECC sent from the controller side through the parity signal line,
ECC check of conducting an ECC check based on an ECC received at the ECC reception step and operation results of ECC operation at the ECC operation step, and
error correction of correcting, when an error is found in the ECC check, the erroneous part of data based on the ECC check.
Other objects, features and advantages of the present invention will become clear from the detailed description given herebelow.